<html>
<head><meta charset="utf-8"><title>Move Definition -&gt; hir · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Move.20Definition.20-.3E.20hir.html">Move Definition -&gt; hir</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208530493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Move%20Definition%20-%3E%20hir/near/208530493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zac Pullar-Strecker <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Move.20Definition.20-.3E.20hir.html#208530493">(Aug 31 2020 at 08:12)</a>:</h4>
<p>In <a href="https://github.com/rust-analyzer/rust-analyzer/pull/5917">5917</a> I've again come up with a use for moving <code>Definition</code> into <code>hir</code>.</p>
<p>As far as I can tell it doesn't really depend on anything in <code>ide_db</code>. Would this be accepted?</p>



<a name="208573945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Move%20Definition%20-%3E%20hir/near/208573945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Move.20Definition.20-.3E.20hir.html#208573945">(Aug 31 2020 at 15:36)</a>:</h4>
<p>Definition is intentionally in IDE -- on the hir level, it doesn't make sense to treat locals &amp; modules the same, for example. On the hir layer, you generally know what <em>kind</em> of definition you can work with. </p>
<p>A generic "any" definition is useful on the IDE layer to implement Goto Definition and such.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>